package com.design.state;

/**
 * 环境类
 * @Author:         cong zhi
 * @CreateDate:     2021/4/5 20:52
 * @UpdateUser:     cong zhi
 * @UpdateDate:     2021/4/5 20:52
 * @UpdateRemark:   修改内容
 * @Version:        1.0
 */
public class Context {

    private State state;

    public Context() {
        this.state=new ConcreteStateA();
    }

    public State getState() {
        return state;
    }

    public void setState(State state) {
        this.state = state;
    }

    /**
     * 对请求做处理
     */
    public void handle(){
        state.handle(this);
    }
}
